import { defineStore } from 'pinia'

export const useTabbarStore = defineStore('tabbar', {
  state: () => ({
    active: 0
  }),
  actions: {
    setActive(value) {
      this.active = value
    }
  }
})


export const useMarketStore = defineStore('market',{
	state: () => ({
		marketData: null
	}),
	getters: {},
	actions: {
		setOrderData(data) {
		  this.marketData = data
		},
		clearOrderData() {
		  this.marketData = null
		}
	},
	persist: true
})

export const userefundStore = defineStore('refund',{
	state: () => ({
		refundData: null
	}),
	getters: {},
	actions: {
		setRefundData(data) {
		  this.refundData = data
		},
		clearRefundData() {
		  this.refundData = null
		}
	},
	persist: true
})

export const useCommnetStore = defineStore('comment',{
	state: () => ({
		commentData: null
	}),
	getters: {},
	actions: {
		setCommentData(data) {
		  this.commentData = data
		},
		clearCommentData() {
		  this.commentData = null
		}
	},
	persist: true
})
